<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCourseQuestionAnswerRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('course_question_answer_records', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('user_id')           ->default(0)->comment('答题用户id');
            $table->bigInteger('course_id')         ->default(0)->comment('课程id');
            $table->bigInteger('course_question_id')->default(0)->comment('问题id');
            $table->string('course_question_option_id_arr') ->default(0)->comment('选项id');
            $table->integer('is_bingo')             ->default(0)->comment('答对了');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
//        Schema::dropIfExists('course_question_answer_records');
    }
}
